package com.yanqu.road.server.timer.activity;

import com.yanqu.road.logic.config.ChannelConfig;
import com.yanqu.road.server.GameServer;
import com.yanqu.road.server.manger.activity.auto.send.AutoSendActivity;
import com.yanqu.road.utils.date.DateHelper;
import com.yanqu.road.utils.executor.GeneralTask;

public class NewAutoSendActivityRewardTask extends GeneralTask {
    @Override
    public void doRun() {
        if (ChannelConfig.AUTO_SEND_CROSS_RANK_REWARD_SWITCH == 1 && AutoSendActivity.isAutoSendRewardServer()) {
            // 将活动加入自动发奖忠
            AutoSendActivity.addNeedAutoSendActivity();
            //
            int hours = DateHelper.getHours();
            if (hours >= 1 && hours <= 18) {
                AutoSendActivity.autoSendReward();
            }
        }
    }
}
